﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace S.Breed.Domain
{
    /// <summary>
    /// 种母配种
    /// </summary>
    [Table("MaternalMating")]
    public class MaternalMatingModel
    {

        [Key]
        ///主键
        public int BreedId { get; set; }

        /// <summary>
        /// 电子耳号
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? EITag { get; set; }
        /// <summary>
        /// 可视耳号
        /// </summary>
        public string EarTag { get; set; }

        /// <summary>
        /// 配种方式
        /// </summary>
        public int? BreedingMethod { get; set; }

        /// <summary>
        /// 种母发情类型
        /// </summary>
        public int? EstrusTypeId { get; set; }

        /// <summary>
        /// 首配评分
        /// </summary>
        [Column(TypeName = "nvarchar(200)")]
        [MaxLength(200)]
        public string? FirstRating { get; set; }

        /// <summary>
        /// 当前栋舍
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? TurnOutBuild { get; set; }

        /// <summary>
        /// 当前栏位
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? TurnOutHuts { get; set; }

        /// <summary>
        /// 转入栋舍
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? TransferBuilding { get; set; }

        /// <summary>
        /// 转入栏位
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? TransferField { get; set; }

        /// <summary>
        /// 配种日期
        /// </summary>
        public DateTime? BreedingDate { get; set; }


        /// <summary>
        /// 种公品种
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? SeedVariety { get; set; }

        /// <summary>
        /// 配种公羊
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? BreedingRam { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? UpdateBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateDate { get; set; }

        /// <summary>
        /// 删除
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public bool? IsOk { get; set; } = true;

        /// <summary>
        /// 单据号
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? DocumentNumber { get; set; }

        /// <summary>
        /// 流水号
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? SerialNumber { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column(TypeName = "nvarchar(200)")]
        [MaxLength(200)]
        public string? Notes { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public int UserId { get; set; } = 0;
        /// <summary>
        /// 繁殖状态
        /// </summary>
        public int ReproductiveState { get; set; }=0;
        /// <summary>
        /// 重量
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? Weight { get; set; }
        /// <summary>
        /// 审核人
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? ReviewedBy { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? ReviewedDate { get; set; }
        /// <summary>
        /// 种母品种
        /// </summary>
        public string? SeedMotherVariety { get; set; }
        /// <summary>
        /// 上次配种日期
        /// </summary>
        public DateTime? lastBreedingDate { get; set; }
        /// <summary>
        /// 配种前后状态
        /// </summary>
        public int BreedState { get; set; }
    }
}